#include "sort.h"
int select_sort(int *array, int len)
{
	int i = 0;
	int j = 0;
	int k = 0;
	while(len > 1){
		k = -1;
		for(i=0; i<len; i++){
			if(array[i] > k){
				j = i;
				k = array[i];
			}
		}
		if(j != len-1){
			EXCHANGE(array,j,len-1); 
		}
		len --;
	}
	return 0;
}

